package org.rarcsoftware;

import com.alibaba.fastjson.JSONObject;
import org.rarcsoftware.bean.ExcelDataEntry;
import org.rarcsoftware.utils.ExcelSheet;
import org.rarcsoftware.utils.ExcelUtil;

import java.util.List;
import java.util.Map;

public class Main {
    public static void main(String[] args) {
        String path = "C:\\project\\python\\excel_tools\\float_test.xlsx";
        String imageTargetPath = "C:\\project\\python\\excel_tools\\images";

        ExcelUtil excelUtil = new ExcelUtil(path, imageTargetPath);
        ExcelSheet sheet = excelUtil.getSheet(0,0);


        System.out.println(sheet.getRowDataList());
        List<Map<Integer, ExcelDataEntry>> rowDataList = sheet.getRowDataList();
        String s = JSONObject.toJSONString(rowDataList);
        System.out.println(s);


//        List<ExcelDataEntry> a = sheet.getDataByTitle("编号" );
//        System.out.println(a);
//
//        ExcelDataEntry c = sheet.getDataByTitle("编号" ,2);
//        System.out.println(c);
//
//        ExcelDataEntry d = sheet.getDataByTitle(1,"编号" ,2);
//        System.out.println(d);

        List<Map<Object, ExcelDataEntry>> colDataList = sheet.getColDataList();
        String colDataListString = JSONObject.toJSONString(colDataList);
        System.out.println(colDataListString);

    }
}